package com.wanjl.mq.config;


import org.springframework.amqp.core.FanoutExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author WanJl
 * @version 1.0
 * @title FanoutConfig
 * @description RabbitMQ交换机(exchange)配置类
 * @create 2025/2/10
 */
@Configuration
public class ExchangeConfig {
    /**
     * 声明一个交换机，在RabbitMQ服务器中创建一个交换机
     * @return FanoutExchange 广播类型的交换机
     */
    @Bean
    public FanoutExchange getFanoutExchange() {
        return new FanoutExchange("mdxq.fanout");
    }

}
